﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="StdRegister.aspx.cs" Inherits="StdRegister" Title="Untitled Page" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <title>Register</title>
    <link rel="Stylesheet" type="text/css" href="App_Themes/Concise/StdRegister.css" />

    <script src="Scripts/prototype-1.6.0.2.js" type="text/javascript"></script>

</asp:Content>
<asp:Content ID="cphLeftNav" ContentPlaceHolderID="cphLeftNav" runat="Server">
    <div id="divshit">
        <input type="text" id="txtTest" onclick="shit()" /></div>
</asp:Content>
<asp:Content ID="cphLeftContent" ContentPlaceHolderID="cphLeftContent" runat="Server">
    <cc1:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
    </cc1:ToolkitScriptManager>
    <div id="reg-content">
        <ul>
            <li><span class="reg-item">Email:</span><asp:TextBox runat="server" CssClass="reg-item-content"
                ID="txtEmail"></asp:TextBox>
                <span class="item-correct-img">
                    <img alt="" src="App_Themes/Concise/image/fzcg_dh.gif" />
                </span>
                <div class="bubble-bottom-left">
                    <div class="bubble-bottom-right">
                        <div class="bubble-top-left">
                            <div class="bubble-top-right">
                                <p style="color: Red; font-weight: bold;">
                                    请输入真实姓名！
                                </p>
                            </div>
                        </div>
                    </div>
                </div>
            </li>
            <li><span class="reg-item">设置密码:</span><asp:TextBox runat="server" CssClass="reg-item-content"
                ID="txtPassword"></asp:TextBox>
                <span class="item-correct-img">
                    <img alt="" src="App_Themes/Concise/image/fzcg_dh.gif" />
                </span>
                <div class="bubble-bottom-left">
                    <div class="bubble-bottom-right">
                        <div class="bubble-top-left">
                            <div class="bubble-top-right">
                                <p style="color: Red; font-weight: bold;">
                                    ！
                                </p>
                            </div>
                        </div>
                    </div>
                </div>
            </li>
            <li><span class="reg-item">密码确认:</span><asp:TextBox runat="server" CssClass="reg-item-content"
                ID="txtPasswordConfirm"></asp:TextBox>
                <div class="bubble-bottom-left">
                    <div class="bubble-bottom-right">
                        <div class="bubble-top-left">
                            <div class="bubble-top-right">
                                <p style="padding: 0px; margin; 0px; color: Red; font-weight: bold;">
                                    请填写真实姓名！
                                </p>
                            </div>
                        </div>
                    </div>
                </div>
            </li>
            <li><span class="reg-item">性别:</span><asp:RadioButton ID="RadioButton1" runat="server"
                Text="男" GroupName="Gender" />
                <asp:RadioButton ID="RadioButton2" runat="server" Text="女" Checked="True" GroupName="Gender" />
            </li>
            <li><span class="reg-item">生日:</span>
                <asp:DropDownList runat="server" ID="ddlYear">
                    <asp:ListItem>1981</asp:ListItem>
                    <asp:ListItem>1982</asp:ListItem>
                    <asp:ListItem>1983</asp:ListItem>
                    <asp:ListItem>1984</asp:ListItem>
                    <asp:ListItem>1985</asp:ListItem>
                    <asp:ListItem>1986</asp:ListItem>
                    <asp:ListItem>1987</asp:ListItem>
                    <asp:ListItem>1988</asp:ListItem>
                    <asp:ListItem>1989</asp:ListItem>
                    <asp:ListItem>1990</asp:ListItem>
                    <asp:ListItem>1991</asp:ListItem>
                    <asp:ListItem>1992</asp:ListItem>
                    <asp:ListItem>1993</asp:ListItem>
                    <asp:ListItem>1994</asp:ListItem>
                </asp:DropDownList>
                <asp:DropDownList ID="ddlMonth" runat="server">
                    <asp:ListItem>1</asp:ListItem>
                    <asp:ListItem>2</asp:ListItem>
                    <asp:ListItem>3</asp:ListItem>
                    <asp:ListItem>4</asp:ListItem>
                    <asp:ListItem>5</asp:ListItem>
                    <asp:ListItem>6</asp:ListItem>
                    <asp:ListItem>7</asp:ListItem>
                    <asp:ListItem>8</asp:ListItem>
                    <asp:ListItem>9</asp:ListItem>
                    <asp:ListItem>10</asp:ListItem>
                    <asp:ListItem>11</asp:ListItem>
                    <asp:ListItem>12</asp:ListItem>
                </asp:DropDownList>
                <asp:DropDownList ID="ddlDay" runat="server">
                    <asp:ListItem>1</asp:ListItem>
                    <asp:ListItem>2</asp:ListItem>
                    <asp:ListItem>3</asp:ListItem>
                    <asp:ListItem>4</asp:ListItem>
                    <asp:ListItem>5</asp:ListItem>
                    <asp:ListItem>6</asp:ListItem>
                    <asp:ListItem>7</asp:ListItem>
                    <asp:ListItem>8</asp:ListItem>
                    <asp:ListItem>9</asp:ListItem>
                    <asp:ListItem>10</asp:ListItem>
                    <asp:ListItem>11</asp:ListItem>
                    <asp:ListItem>12</asp:ListItem>
                    <asp:ListItem>13</asp:ListItem>
                    <asp:ListItem>14</asp:ListItem>
                    <asp:ListItem>15</asp:ListItem>
                    <asp:ListItem>16</asp:ListItem>
                    <asp:ListItem>17</asp:ListItem>
                    <asp:ListItem>18</asp:ListItem>
                    <asp:ListItem>19</asp:ListItem>
                    <asp:ListItem>20</asp:ListItem>
                    <asp:ListItem>21</asp:ListItem>
                    <asp:ListItem>22</asp:ListItem>
                    <asp:ListItem>23</asp:ListItem>
                    <asp:ListItem>24</asp:ListItem>
                    <asp:ListItem>25</asp:ListItem>
                    <asp:ListItem>26</asp:ListItem>
                    <asp:ListItem>27</asp:ListItem>
                    <asp:ListItem>28</asp:ListItem>
                    <asp:ListItem>29</asp:ListItem>
                    <asp:ListItem>30</asp:ListItem>
                    <asp:ListItem>31</asp:ListItem>
                </asp:DropDownList>
            </li>
            <li><span class="reg-item">学校:</span>
                <asp:TextBox runat="server" ID="txtSchool"></asp:TextBox>
                <cc1:DropDownExtender ID="txtSchool_DropDownExtender" runat="server" DynamicServicePath=""
                    Enabled="True" TargetControlID="txtSchool">
                    <Animations></Animations>
                </cc1:DropDownExtender>
                <div>
                </div>
            </li>
            <li>
                <asp:Button runat="server" Text="注册" /></li>
        </ul>
    </div>

    <script type="text/javascript">
    
    function emailCheck (emailStr) {
        var emailPat=/^(.+)@(.+)$/;
        var matchArray=emailStr.match(emailPat);
        if (matchArray==null) {
            return false;
        }
        return true;
    }
    Event.observe(window,'load', function () {
        
    var targets = $$('span.reg-item');
    for (var i=0;i<targets.length;i++)
    {
        var target = targets[i].next('input.reg-item-content');
        if(target != undefined && target.type=='text')
        {
          Event.observe(target,'focus',function(event)
          {
              var result =false;
              var target =  event.element().next('div');
              switch (event.element().id)
              {
                case '<%=txtEmail.ClientID %>':
                    result = emailCheck(event.element().value);
                break;
              }
              if(!result)
              {
                    target.setStyle({display:"inline-block"});
              }
              
          })
          Event.observe(target,'blur',function(event)
          {
              var target =  event.element().next('div');
              target.setStyle({display:'none'});
          })
        }
    }
    }
   )
   function shit()
   {
   StdRegister.abc(abc_callback);
   }
   function abc_callback(response)
   {
   alert(response.value);
   }
   
    </script>

</asp:Content>
<asp:Content ID="cphRightContent" ContentPlaceHolderID="cphRightContent" runat="Server">
</asp:Content>
